package com.hlhj.funlike_business.activity.adapter;

import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.util.Log;

import java.util.List;

public class FoodTitleAdp extends FragmentPagerAdapter {

    private List<String> strings;
    private List<Fragment> fragments;
    public FoodTitleAdp(FragmentManager fm,List<String> strings,List<Fragment> fragments) {
        super(fm);
        this.strings = strings;
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return strings.size();
    }

    @Nullable
    @Override
    public CharSequence getPageTitle(int position) {
        Log.e("zy",strings.get(position));
        return strings.get(position);
    }
}
